{% extends "base_1col.html" %}

{% block title %}Weblog | {{ object.title|escape }}{% endblock %}

{% block content %}

<div class="post">
  <div class="title">
     <h2><a href="{{ object.get_absolute_url }}">{{ object.title|safe }}</a></h2>
     <p class="date small">Posted by <strong>{{ object.author }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
   </div>
        
   <div class="entry">
       {{ object.body_html|safe }}
    </div>
</div>

{% load comments %}
{% get_comment_list for zblog.entry object.id as comment_list %}

<div id="content-secondary">
<h2 id="comments">Comments</h2>

{% for comment in comment_list %}
<div class="comment" id="c{{ comment.id }}">
    <h3><strong>{{ comment.user_name|escape }}</strong> <span class="small quiet">{{ comment.submit_date|date:"F j, Y" }} at {{ comment.submit_date|date:"P" }}</span></h3>
    {{ comment.comment|escape|urlizetrunc:"200"|linebreaks }}
</div>
{% endfor %}
<br>
<hr>
{% if object.comments_enabled %}
	<h2>Post a comment</h2>
	{% render_comment_form for zblog.entry object.id %}
{% else %}
	<h2>Comments are closed</h2>
	<p>To prevent spam, comments are no longer allowed after sixty days.</p>
{% endif %}

</div>

{% endblock %}